package com.andy.utils;

import android.content.Context;
import android.widget.Toast;

/**
 * Created by Andy on  2024/4/24 1:15
 * Email: 963069079@qq.com
 */
public final class UIUtil
{
    private static Toast toast;
    /**
     * Toast提醒
     * @param context
     * @param msg
     */
    public static void showToast(Context context, String msg){
        if(toast == null){
            toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT);
        }else{
            toast.setText(msg);
        }
        toast.show();
    }
}
